export default function unknowToNumber(val: unknown): number | undefined {
  if (typeof val === "string") {
    const result = Number(val)
    if (Number.isNaN(result)) {
    } else {
      return result
    }
  }
  if (typeof val === "number" && !Number.isNaN(val)) {
    return val
  }
}
